package com.entity;

import java.util.Date;

public class Orders {
    private Integer id;
    private Integer number;
    private Integer money;
    private Integer customers_id;
    private Integer food_id;
    private Integer total;
    private Long oNumber;
    private Integer state;
    private String ordertime;
    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    //外键
    private String name;
    private String photo;
    private int subtotal;//小计

    public int getSubtotal() {
        return getNumber()*getMoney();
    }

    public void setSubtotal(int subtotal) {
        this.subtotal = getNumber()*getMoney();
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getNumber() {
        return number;
    }

    public void setNumber(Integer number) {
        this.number = number;
    }

    public Integer getMoney() {
        return money;
    }

    public void setMoney(Integer money) {
        this.money = money;
    }

    public Integer getCustomers_id() {
        return customers_id;
    }

    public void setCustomers_id(Integer customers_id) {
        this.customers_id = customers_id;
    }

    public Integer getFood_id() {
        return food_id;
    }

    public void setFood_id(Integer food_id) {
        this.food_id = food_id;
    }

    public Integer getTotal() {
        return total;
    }

    public void setTotal(Integer total) {
        this.total = total;
    }

    public Long getoNumber() {
        return oNumber;
    }

    public void setoNumber(Long oNumber) {
        this.oNumber = oNumber;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPhoto() {
        return photo;
    }

    public void setPhoto(String photo) {
        this.photo = photo;
    }

    public String getOrdertime() {
        return ordertime;
    }

    public void setOrdertime(String ordertime) {
        this.ordertime = ordertime;
    }

    @Override
    public String toString() {
        return "Orders{" +
                "id=" + id +
                ", money=" + money +
                ", customers_id=" + customers_id +
                ", food_id=" + food_id +
                ", oNumber=" + oNumber +
                ", state=" + state +
                ", ordertime='" + ordertime + '\'' +
                '}';
    }
}
